﻿using System;
using System.Collections.Generic;
using System.Text;

namespace KeyCtrl
{
    [Serializable]
    class BGException : Exception
    {
        public Exception OriginalException;

        public BGException(string errorMessage) : base(errorMessage) {}
        public BGException(string errorMessage, Exception originalException) : base(errorMessage)
        { 
            OriginalException = originalException; 
        }
        
        static public void Assert(bool value, String message)
        {
            if (!value)
                throw new BGException(message);
        }
    }
}
